Skip to content

feat: watch command execute on successful build#151

Merged
jacoobes merged 6 commits intosern-handler:mainfrom
SrIzan10:feat/watchcmd
Feb 7, 2025
Merged

feat: watch command execute on successful build#151
jacoobes merged 6 commits intosern-handler:mainfrom
SrIzan10:feat/watchcmd

Conversation

@SrIzan10
Copy link
Copy Markdown
Member

absolute cinema

@SrIzan10
Copy link
Copy Markdown
Member Author

@jacoobes i also request a review from you :)

Comment thread src/commands/build.ts Outdated
Comment thread src/commands/build.ts Outdated

console.log(`[watch] running command: ${cmd}`);

currentProcess = execa(cmd, { stdio: 'inherit', shell: true });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to timeout this?

Comment thread src/commands/build.ts Outdated
Copy link
Copy Markdown
Member

@EvolutionX-10 EvolutionX-10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything else Looks good to me, confirm testing with @jacoobes

Comment thread src/commands/build.ts Outdated
Comment thread src/commands/build.ts Outdated
Comment thread src/commands/build.ts Outdated
Comment thread src/commands/build.ts Outdated
Comment thread src/commands/build.ts Outdated
@SrIzan10
Copy link
Copy Markdown
Member Author

it works well for me

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Jan 31, 2025 via email

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Feb 2, 2025

i will test this week. stuff got pushed

EvolutionX-10
EvolutionX-10 previously approved these changes Feb 2, 2025
Copy link
Copy Markdown
Member

@EvolutionX-10 EvolutionX-10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Feb 4, 2025

API proposal: theres this proposal adds watchCommand which allows user to run any script they want after succesful build, and also the implicit start command. why not this: if watchCommand is supplied, then it overrides the default <packageManager> start. I can implement this in the branch. How does that sound?

@EvolutionX-10 @SrIzan10

@SrIzan10
Copy link
Copy Markdown
Member Author

SrIzan10 commented Feb 5, 2025

i think it already does that. if there's a watch command run that, else the start command

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Feb 5, 2025

i think it already does that. if there's a watch command run that, else the start command

ahhh i see okay

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Feb 6, 2025

lets push a dev release, how does that sound? @SrIzan10 @EvolutionX-10 that way we can let the community test it.

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Feb 6, 2025

before that i need to implement debouncing on build calls to avoid extra calls

@jacoobes
Copy link
Copy Markdown
Member

jacoobes commented Feb 7, 2025

note: esbuild local npm links do not work with watch command

@jacoobes jacoobes merged commit 1695956 into sern-handler:main Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants